package com.tkjt.pms.calc.formula.common;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

public class FormulaConsts {

	public final static String RET_SUCCESS = "success";
	public final static String RET_FAIL = "fail";
	
	public final static String TYPE_ENGINE_EXCEL = "excelEngine";

	public final static String ITEM_WHICH_ENGINE = "itemWhichEngine";
	//public final static String ITEM_DATA_TYPE = "itemDataType";
	
	public final static String ITEM_CONFIG_WHICH_DATAS = "itemConfigWhichDatas";
	
	public final static String ITEM_FORMULA_WHICH_DATA = "itemFormulaWhichData";
	public final static String ITEM_FORMULA_RULE = "itemFormulaRule";
	public final static String ITEM_FORMULA_VALUE = "itemFormulaValue";
	public final static String ITEM_FORMULA_EXCEPTION = "itemFormulaException";
	public final static String ITEM_FORMULA_RESULT = "itemFormulaResult";
	public final static String ITEM_FORMULA_RESULT_CELLS = "itemFormulaResultCells";
	public final static String ITEM_FORMULA_RESULT_VALUE = "itemFormulaResultValue";
	
//	public final static String ITEM_CALC_MI = "itemCalcMi";
//	public final static String ITEM_CALC_QI= "itemCalcQi";
	public final static String ITEM_CALC_SCORER= "itemCalcScorer";
	public final static String ITEM_CALC_DEPART= "itemCalcDepart";
	public final static String ITEM_CALC_INDEX_VALUE_CODE= "itemCalcIndexValueCode";

	public final static String RET_EXCEL_FORMULA = "retExcelFormula";
	public final static String RET_EXCEL_CELLS = "retExcelCells";
	
	public final static String F_DATA_KEY_MS = "Ms";// 表示取 1月到 12月的数据， 共12个数据， 不存的月份数据使用空指针：null
	public final static String F_DATA_KEY_QS = "Qs";// 表示取 1季度 到 四季度的数据， 共4个数据， 不存的季度数据使用空指针：nul
	public final static String F_DATA_KEY_QIMS = "QiMs";//当季度下的所有月份 , 比如当前 1 季度 ,取 1-3 月份数据
	public final static String F_DATA_KEY_MI = "Mi";// 当前月份数据， 比如: 现在是6月份， 那就取6月的数据。 但取数据时， 还是把1 到 12月的数据都取出来
	public final static String F_DATA_KEY_QI = "Qi";// 当前季度数据, 比如 : 当前 1 季度 , 那就取 1 季度数据. 但取数据时， 还是把1 到 4季度的数据都取出来
	public final static String F_DATA_KEY_MTOTAL = "mTotal";//汇总列
	public final static String F_DATA_KEY_W = "W"; //权重
	
	public final static List<String> calcWhichDatas = new ArrayList<>(); 
	static {
		calcWhichDatas.add(FormulaConsts.F_DATA_KEY_MI);
		//calcWhichDatas.add(FormulaConsts.F_DATA_KEY_QI);
		calcWhichDatas.add(FormulaConsts.F_DATA_KEY_MTOTAL);
	}

	public final static List<String> basicCalcWhichDatas = new ArrayList<>();
	static {
		basicCalcWhichDatas.add(FormulaConsts.F_DATA_KEY_MI);
	}
	
	public final static Set<String> formulaVariableKeys = new HashSet<>();
	static {
		formulaVariableKeys.add("Ms");
		formulaVariableKeys.add("Qs");
		formulaVariableKeys.add("QiMs");
		formulaVariableKeys.add("Mi");
		formulaVariableKeys.add("Qi");
		formulaVariableKeys.add("mTotal");
		
		formulaVariableKeys.add("QiM01");
		formulaVariableKeys.add("QiM02");
		formulaVariableKeys.add("QiM03");

		formulaVariableKeys.add("Q01");
		formulaVariableKeys.add("Q02");
		formulaVariableKeys.add("Q03");
		formulaVariableKeys.add("Q04");
		
		formulaVariableKeys.add("M01");
		formulaVariableKeys.add("M02");
		formulaVariableKeys.add("M03");
		formulaVariableKeys.add("M04");
		formulaVariableKeys.add("M05");
		formulaVariableKeys.add("M06");
		formulaVariableKeys.add("M07");
		formulaVariableKeys.add("M08");
		formulaVariableKeys.add("M09");
		formulaVariableKeys.add("M10");
		formulaVariableKeys.add("M11");
		formulaVariableKeys.add("M12");	
		
		formulaVariableKeys.add("KC");
		formulaVariableKeys.add("KG");
		formulaVariableKeys.add("A01A");
		formulaVariableKeys.add("ATR");

		formulaVariableKeys.add("W");
		//基础数据参数
		formulaVariableKeys.add("JT");
		
	}
	

	
	public final static List<String> orderKeys = new ArrayList<>();
	static {
		
		orderKeys.add("mTotal");
		
		orderKeys.add("m01");
		orderKeys.add("m02");
		orderKeys.add("m03");
		orderKeys.add("m04");
		orderKeys.add("m05");
		orderKeys.add("m06");
		orderKeys.add("m07");
		orderKeys.add("m08");
		orderKeys.add("m09");
		orderKeys.add("m10");
		orderKeys.add("m11");
		orderKeys.add("m12");	

		orderKeys.add("q01");
		orderKeys.add("q02");
		orderKeys.add("q03");
		orderKeys.add("q04");
		
	}
}
